package cn.tedu._04mybatis.mapper;

import cn.tedu._04mybatis.pojo.entity.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * Mapper注解:
 *   1.MyBatis框架的注解, 为该接口创建实现类;
 */
@Mapper
public interface UserMapper {
   // @Insert("INSERT INTO user(username,password,nickname,created) VALUES (#{username},#{password},#{nickname},#{created})")
    int insertUser(User user);



    /*
        UserMapper userMapper = new UserMapper();
        userMapper.insertUser(user);

        User user = new User();
        user.setUsername("范传奇");
        user.setPassword("123456");
        user.setNickname("老范");
        user.setCreated(new Date());
     */
}








